-
Notifications
You must be signed in to change notification settings - Fork 913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix opensearch theme version #978
Conversation
Nit: Can we update the commit to include more details and have a description. Doesn't have to be much and you can add the issue in there as well. |
For tracking purposes related to this PR. Can we say we manually verified this will not break backwards compatibility? |
eeba9e7
to
3e84c22
Compare
Yes, the PR has no logical change but just updates the naming of the themes. This will only affect the UI. From my local testing, there is no behavior change. In theory, there shouldn't have any regression issue. However, one thing I have to mention here is that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think we should consider just using the default and removing this option as Jules mentioned in #494. |
3e84c22
to
5f5ebbb
Compare
Yes, let's get @ahopp to take a look at this before merging - to weigh in on what to call these two alternative themes, or whether to just standardize on a single theme. |
@tmarkley sorry for the delay! I'm not seeing a ton of value in the "secondary" theme. For now, I think it would be better to standardize on a single theme. Do we have a good view of the differences between the two themes? |
The theme (v8 beta) does't seem fully finished, I have noticed some layout cutting in UI (and errors in console as well) for the second theme (v8 beta). From this standing point, i think it is good to remove. |
Roger, in that case it makes sense to align on the "v7" and begin any work on new theming can be resolved at a latter date. Thanks! |
If any case, if we remove the option lets make sure it doesn't break any backwards compatibility on start up if someone from the legacy app had this setting to the beta. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with backwards compatibility verification; otherwise, looks good to me
Thanks @ananzh for helping me on backwards compatible testing from " odfe-1.13.2 vanilla version" to the "latest change". The UI looks good to me. |
5f5ebbb
to
63f7994
Compare
Yes, we are targeting |
56bfda5
to
1e54595
Compare
Originally, in Advanced setting, there is a setting let you set theme version from `v7` to `v8(beta)` implying version that do not exist yet. Change the version label to `v1` as default theme and remove the beta version. Hide `theme:version` UI from Advanced Setting since we have only one theme avaialble now. Signed-off-by: Zuocheng Ding <[email protected]>
1e54595
to
9cca40c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think before we merge this we should probably have integration and functional tests that confirm that no matter what setting was applied before updating, v1
is always applied.
schema.literal('v7'), | ||
schema.literal('v8 (beta)'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we remove these from the schema?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for backward compatibility, user's injectedMetadata from previous version is readonly
and there is no way to modify it. The current system will do an initial schema validation during the startup, so you will see some warnings in console if we remove this fields. The way I proposed is to override the user injectedData after the data loaded (deep copied) into the memory (cache), then I override it as default value v1
.
expect(() => validate('v7')).not.toThrow(); | ||
expect(() => validate('v8 (beta)')).not.toThrow(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep these and expect them to throw?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same reason as above, It will be validated based on the schema we defined
I think the unit test might be sufficient because it covered the main concern for naming change. Just to make sure we are on same page, |
@zuochengding, @tmarkley, in summation what would be the last things to get this PR in? |
@@ -175,6 +177,17 @@ You can use \`IUiSettingsClient.get("${key}", defaultValue)\`, which will just r | |||
return this.updateErrors$.asObservable(); | |||
} | |||
|
|||
resetThemeVersion() { | |||
const key = 'theme:version'; | |||
// Reset userValue to default value if any legacy theme verion exists. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: typo verion
should be version
const key = 'theme:version'; | ||
// Reset userValue to default value if any legacy theme verion exists. | ||
if ( | ||
this.cache[key] !== undefined && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we set the value if the cache is undefined?
Apologies for not responding to this sooner. The unit test covers the functionality of |
# [24.5.0](elastic/elastic-charts@v24.4.0...v24.5.0) (2021-01-30) ### Bug Fixes * add theme min radius to point shape ([opensearch-project#996](elastic/elastic-charts#996)) ([98089a9](elastic/elastic-charts@98089a9)) * align tooltip z-index to EUI tooltip z-index ([opensearch-project#931](elastic/elastic-charts#931)) ([f7f1f6f](elastic/elastic-charts@f7f1f6f)) * chart state and series functions cleanup ([opensearch-project#989](elastic/elastic-charts#989)) ([42a7af0](elastic/elastic-charts@42a7af0)) * create unique ids for dot icons ([opensearch-project#971](elastic/elastic-charts#971)) ([0b3e00f](elastic/elastic-charts@0b3e00f)) * external tooltip legend extra value sync ([opensearch-project#993](elastic/elastic-charts#993)) ([7e1096e](elastic/elastic-charts@7e1096e)) * **legend:** disable focus and keyboard navigation for legend in partition ch… ([opensearch-project#952](elastic/elastic-charts#952)) ([dfff3e2](elastic/elastic-charts@dfff3e2)) * **legend:** hierarchical legend order should follow the tree paths ([opensearch-project#947](elastic/elastic-charts#947)) ([7b70186](elastic/elastic-charts@7b70186)), closes [opensearch-project#944](elastic/elastic-charts#944) * **legend:** remove ids for circles ([opensearch-project#973](elastic/elastic-charts#973)) ([ed98481](elastic/elastic-charts@ed98481)) ### Features * **cursor:** improve theme styling for crosshair ([opensearch-project#980](elastic/elastic-charts#980)) ([0248ad6](elastic/elastic-charts@0248ad6)) * **legend:** display pie chart legend extra ([opensearch-project#939](elastic/elastic-charts#939)) ([672a4df](elastic/elastic-charts@672a4df)) * **legend:** add keyboard navigation ([opensearch-project#880](elastic/elastic-charts#880)) ([b471a94](elastic/elastic-charts@b471a94)) * **partition:** Flame and icicle chart ([opensearch-project#965](elastic/elastic-charts#965)) ([9e8b1f7](elastic/elastic-charts@9e8b1f7)) * **partition:** legend hover options ([opensearch-project#978](elastic/elastic-charts#978)) ([acd1339](elastic/elastic-charts@acd1339)) * **xy:** support multiple point shapes on line, area and bubble charts ([opensearch-project#988](elastic/elastic-charts#988)) ([4f23b4f](elastic/elastic-charts@4f23b4f))
There's a lot of conflicts here and I think the PR still as to address changes. Should we remove the 2.0.0 label? |
There is currently to a PR to remove the v7 and v8 (beta) theme versions within the application but it is getting stale: opensearch-project#978 Since the v8 (beta) theme isn't actually planned and has the incorrect version, we do not want end users to be able to change this setting. In the essence of time, this will prevent this setting from showing in the Advanced Settings page but will also not break users who set this version already (however it will lock them into theme until they switched by manually updating or deleting the config doc). Removing this setting will force the default to be v8 (beta). Temporary fix for: opensearch-project#494 But it should be removed completely. Signed-off-by: Kawika Avilla <[email protected]>
There is currently to a PR to remove the v7 and v8 (beta) theme versions within the application but it is getting stale: opensearch-project#978 Since the v8 (beta) theme isn't actually planned and has the incorrect version, we do not want end users to be able to change this setting. In the essence of time, this will prevent this setting from showing in the Advanced Settings page but will also not break users who set this version already (however it will lock them into theme until they switched by manually updating or deleting the config doc). Removing this setting will force the default to be v8 (beta). Temporary fix for: opensearch-project#494 But it should be removed completely. Signed-off-by: Kawika Avilla <[email protected]>
There is currently to a PR to remove the v7 and v8 (beta) theme versions within the application but it is getting stale: #978 Since the v8 (beta) theme isn't actually planned and has the incorrect version, we do not want end users to be able to change this setting. In the essence of time, this will prevent this setting from showing in the Advanced Settings page but will also not break users who set this version already (however it will lock them into theme until they switched by manually updating or deleting the config doc). Removing this setting will force the default to be v8 (beta). Temporary fix for: #494 But it should be removed completely. Signed-off-by: Kawika Avilla <[email protected]>
Will close and link to the issue we did a temp work around for 2.0 but will need to remove this for 3.0 |
There is currently to a PR to remove the v7 and v8 (beta) theme versions within the application but it is getting stale: #978 Since the v8 (beta) theme isn't actually planned and has the incorrect version, we do not want end users to be able to change this setting. In the essence of time, this will prevent this setting from showing in the Advanced Settings page but will also not break users who set this version already (however it will lock them into theme until they switched by manually updating or deleting the config doc). Removing this setting will force the default to be v8 (beta). Temporary fix for: #494 But it should be removed completely. Signed-off-by: Kawika Avilla <[email protected]> (cherry picked from commit 87e5412)
There is currently to a PR to remove the v7 and v8 (beta) theme versions within the application but it is getting stale: #978 Since the v8 (beta) theme isn't actually planned and has the incorrect version, we do not want end users to be able to change this setting. In the essence of time, this will prevent this setting from showing in the Advanced Settings page but will also not break users who set this version already (however it will lock them into theme until they switched by manually updating or deleting the config doc). Removing this setting will force the default to be v8 (beta). Temporary fix for: #494 But it should be removed completely. Signed-off-by: Kawika Avilla <[email protected]> (cherry picked from commit 87e5412)
There is currently to a PR to remove the v7 and v8 (beta) theme versions within the application but it is getting stale: #978 Since the v8 (beta) theme isn't actually planned and has the incorrect version, we do not want end users to be able to change this setting. In the essence of time, this will prevent this setting from showing in the Advanced Settings page but will also not break users who set this version already (however it will lock them into theme until they switched by manually updating or deleting the config doc). Removing this setting will force the default to be v8 (beta). Temporary fix for: #494 But it should be removed completely. Signed-off-by: Kawika Avilla <[email protected]> (cherry picked from commit 87e5412) Co-authored-by: Kawika Avilla <[email protected]>
There is currently to a PR to remove the v7 and v8 (beta) theme versions within the application but it is getting stale: #978 Since the v8 (beta) theme isn't actually planned and has the incorrect version, we do not want end users to be able to change this setting. In the essence of time, this will prevent this setting from showing in the Advanced Settings page but will also not break users who set this version already (however it will lock them into theme until they switched by manually updating or deleting the config doc). Removing this setting will force the default to be v8 (beta). Temporary fix for: #494 But it should be removed completely. Signed-off-by: Kawika Avilla <[email protected]> (cherry picked from commit 87e5412) Co-authored-by: Kawika Avilla <[email protected]>
…t#1598) There is currently to a PR to remove the v7 and v8 (beta) theme versions within the application but it is getting stale: opensearch-project#978 Since the v8 (beta) theme isn't actually planned and has the incorrect version, we do not want end users to be able to change this setting. In the essence of time, this will prevent this setting from showing in the Advanced Settings page but will also not break users who set this version already (however it will lock them into theme until they switched by manually updating or deleting the config doc). Removing this setting will force the default to be v8 (beta). Temporary fix for: opensearch-project#494 But it should be removed completely. Signed-off-by: Kawika Avilla <[email protected]>
…t#1598) There is currently to a PR to remove the v7 and v8 (beta) theme versions within the application but it is getting stale: opensearch-project#978 Since the v8 (beta) theme isn't actually planned and has the incorrect version, we do not want end users to be able to change this setting. In the essence of time, this will prevent this setting from showing in the Advanced Settings page but will also not break users who set this version already (however it will lock them into theme until they switched by manually updating or deleting the config doc). Removing this setting will force the default to be v8 (beta). Temporary fix for: opensearch-project#494 But it should be removed completely. Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Zuocheng Ding [email protected]
Description
This PR will update the old kibana theme version and tag to
v1
andv2
.[EDIT] : The new revision will change the default theme version to
v1
and remove the beta themeIssues Resolved
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr